package com.qianli.cashmama.product.server.dao.impl;

import com.fqgj.common.api.Page;
import com.fqgj.common.base.AbstractBaseMapper;
import com.qianli.cashmama.product.server.dao.PayCallbackLogDao;
import com.qianli.cashmama.product.server.entity.ClReceiverDetailEntity;
import com.qianli.cashmama.product.server.entity.PayCallbackLogEntity;
import com.qianli.cashmama.product.server.entity.TBillEntity;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * User: anonymous
 * Date: 2021-12-07
 * Time: 10:33:15.565
 */

@Repository
public class PayCallbackLogDaoImpl extends AbstractBaseMapper<PayCallbackLogEntity> implements PayCallbackLogDao {

    @Override
    public List<PayCallbackLogEntity> getListByStatus(Integer status, Page page) {
        Map<String, Object> map = new HashMap<>();
        map.put("status", status);
        map.put("page", page);
        return getSqlSession().selectList("getListByStatus", map);
    }


    @Override
    public ClReceiverDetailEntity getOneByMobile(String mobile) {
        Map<String, Object> map = new HashMap<>();
        map.put("mobile", mobile);
        return getSqlSession().selectOne("getOneByMobile", map);
    }

    @Override
    public TBillEntity getBillByTradeNo(String tradeNo) {
        Map<String, Object> map = new HashMap<>();
        map.put("tradeNo", tradeNo);
        return getSqlSession().selectOne("getBillByTradeNo", map);
    }
}